#include <xTitanClient/xTitan.hpp>
#include "xSocketClient.h"

xSocketClient::~xSocketClient(void)
{
}

xSocketClient::xSocketClient( const std::string& host, int port )
	:SocketClient(host, port)
{
	QString msg("[xDivaInitClient]$");
	xRawCommand("socket", QVariant(msg));
}

std::string xSocketClient::_receiveLine( std::string receiver ){
	std::string result = SocketClient::_receiveLine(receiver);
	QString msg = QString("%1%2").arg(receiver.c_str()).arg(result.c_str());
	xRawCommand(XTITAN_SOCKET, QVariant(msg));
	return result;
}

void xSocketClient::_sendLine( std::string sender, std::string s ){
	QString msg = QString("%1%2").arg(sender.c_str()).arg(s.c_str());
	xRawCommand(XTITAN_SOCKET, QVariant(msg));
	SocketClient::_sendLine(sender, s);
}
